package com.huan.controller;

import com.huan.VO.RoleVo;
import com.huan.domain.ResponseResult;
import com.huan.domain.entity.Role;
import com.huan.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController()
@RequestMapping("/system/role")
public class RoleController {
    @Autowired
    private RoleService roleService;
    @GetMapping("/list")
    public ResponseResult getAllRole(Integer pageNum, Integer pageSize, String roleName, String status){
        return roleService.getAllRole(pageNum,pageSize,roleName,status);
    }
    @PutMapping("/changeStatus")
    public ResponseResult changeStatus(@RequestBody RoleVo role){
        return roleService.changeStatus(role);
    }
}
